/* ====================================================================
 * (#)Header: Role.java
 * (#)Revision: 
 * (#)Date Created: Mar 15, 2007 11:56:18 PM
 * (#)Created By: Karol Wozniak
 * ====================================================================
 *
 * Copyright (c) 2007 karolak .  All rights reserved.
 *
 * ====================================================================
 * 
 * The software application represented here is the sole property of 
 * karolak. Its unauthorized utilization is expressly prohibited.
 * 
 * ====================================================================
 */
package com.karolak.entity.app;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.karolak.entity.AbstractEntity;

/**
 * <code>Role</code> is used to ....
 * 
 * @author <a href="mailto:kwozniak@hotmail.com">Karol Wozniak</a>
 */
@Entity
@Table(name = "role")
public class Role extends AbstractEntity<Integer> {

	private static final long serialVersionUID = 1L;

	private String name;
	private String description;

	@Override
	@Id
	@Column(name = "id")
	public Integer getId() {
		return super.getId();
	}

	@Basic(fetch = FetchType.EAGER)
	@Column(name = "name", unique = true, nullable = false, length = 20)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Basic(fetch = FetchType.EAGER)
	@Column(name = "description", length = 80)
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
}
